package com.sss.day35_mvc_mybatis.controller;

import com.sss.day35_mvc_mybatis.model.OrderVO;
import com.sss.day35_mvc_mybatis.service.OrderService;
import com.sss.day35_mvc_mybatis.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 全世界我最爱朴彩英！
 *
 * @Author sss
 * @Create 2023/11/28 17:55
 */
@RestController
public class Demo5OrderController {
    @Autowired
    private OrderService service;

    @GetMapping("/order/user")
    public R one2one(int oid) {
        OrderVO vo = service.findOrderWithUserByOid(oid);
        return R.ok(vo);
    }
}
